function [A, b] = gauss1(A, b)
	% triunghiularizare sistem
	% prin eliminare gaussiana
	% Intrari : A = matrice sistem
	% b = vector termeni liberi
	% Iesiri : A = matrice sistem triunghiular
	% b = termeni liberi sistem triunghiular
	[n, n] = size(A);
	for p = 1 : n-1
		for i=p+1 : n
			t = A(i, p) / A(p, p);
			A(i,p:n) = A(i, p:n) - t* A(p, p:n);
			b(i) = b(i) - t * b(p);
		endfor
	endfor
endfunction